//
//  TTSHomePageViewController.m
//  TTSAmericanMovie
//
//  Created by chenHR on 16/1/26.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "TTSHomePageViewController.h"
#import "AppDelegate.h"
#import "TTSTitleView.h"

@interface TTSHomePageViewController ()

@property (nonatomic, retain) AppDelegate *appDelegate;
@property (nonatomic, strong) TTSTitleView *titleView;

@end

@implementation TTSHomePageViewController

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [self.appDelegate.window addSubview:self.titleView];
}
- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    [self.titleView removeFromSuperview];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    self.titleView = [[TTSTitleView alloc] initWithFrame:CGRectMake(0, 20, WIDTH, 64) withTitleName:@"人人美剧"];
    self.titleView.backgroundColor = [UIColor clearColor];
    self.appDelegate = [UIApplication sharedApplication].delegate;
    [self.appDelegate.window addSubview:_titleView];
    
    
    
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
